<template>
    <div class="PlayGame">
        <div class="back-btn" @click="back">
            <span>返回游戏</span>
        </div>
        <iframe class="iframe" :src="url"></iframe>
    </div>
</template>
<script setup>
import { onMounted, ref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
const route = useRoute()
const router = useRouter()
const url = ref("")
const back = () => {
    router.back()
}
onMounted(async () => {
    url.value = route.query.url
})
</script>
<style lang="scss" scoped>
.PlayGame {
    width: 100%;
    padding: 20px;
    height: 700px;
    box-sizing: border-box;
    .back-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 120px;
        height: 50px;
        background: rgb(0, 103, 184);
        font-size: 14px;
        border-radius: 5px;
        color: #fff;
        cursor: pointer;
        margin-bottom: 15px;
    }
    .iframe {
        width: 100%;
        height: 100%;
    }
}
</style>